﻿@using mtg_trader.Web.HtmlHelpers
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>@ViewBag.Title</title>
    @Styles.Render("~/Content/css")
    @Styles.Render("~/Content/bootstrap")
    @Scripts.Render("~/bundles/modernizr")
</head>
<body>

    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")
    @RenderSection("scripts", required: false)

    <div id="wrap">
        <div style="padding: 10px;">
            <div class="navbar">
                <div class="navbar-inner">
                    <span class="brand">mtg-trader</span>
                    <ul class="nav">
                        @Html.NavItem("Home", "Index", "Home")
                        @Html.NavItem("Administration", "Index", "Administration")
                        @{
                            if (User.Identity.IsAuthenticated)
                            {
                                <li class="dropdown">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Login</a>
                                    <ul class="dropdown-menu">
                                        <li>
                                            @Html.TextBox("DisplayName")
                                            @Html.Password("Password")
                                        </li>
                                    </ul>
                                </li>
                            }
                            else
                            {

                            }
                        }
                    </ul>
                </div>
            </div>
            @if (!string.IsNullOrEmpty(ViewBag.Breadcrumb))
            {
                <ul class="breadcrumb">
                    @{
                var crumbs = ((string)ViewBag.Breadcrumb).Split(',');
                var lastCrumb = crumbs.Last();
                foreach (var crumb in crumbs)
                {
                    if (crumb == lastCrumb)
                    {
                        <li class="active">@crumb</li>
                    }
                    else
                    {
                        <li><a href="#">@crumb</a> <span class="divider">/</span></li>
                    }
                }
                    }
                </ul>
            }

            @RenderBody()

        </div>
        <div id="push"></div>

    </div>

    @* Footer *@
    @Html.Partial("_BlackLotusTicker")



</body>
</html>
